package j4win;

import java.awt.*;

public class ImageTracker {
	private static MediaTracker mt;
	private static int id = 0;
	
	public static void init(Component c) {
		mt = new MediaTracker(c);
	}
	
	public static void addImage(Image img) {
		mt.addImage(img, id++);
	}
	
	public static void waitForImages() {
		try {
			mt.waitForAll();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
